package cn.kys.common.utils;

import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.Map;

public class TMain {
    public static void main(String args[]){
        String geoJsonStr = "{\n" +
                "            \"type\":\"Point\",\n" +
                "            \"coordinates\":[105.380859375,31.57853542647338]\n" +
                "            }";

        /*String geoJsonStr2 = "{\"type\":\"Feature\",\n" +
                "        \"properties\":{},\n" +
                "        \"geometry\":{\n" +
                "            \"type\":\"Point\",\n" +
                "            \"coordinates\":[105.380859375,31.57853542647338]\n" +
                "            }\n" +
                "        }";*/

        String geoJsonStr2 = "{\"type\":\"Feature\",\n" +
                "        \"properties\":{},\n" +
                "        \"geometry\":{\n" +
                "            \"type\":\"MultiPolygon\",\n" +
                "            \"coordinates\":[[[[76.914715783,35.666349687],[76.914781096,35.666551481],[76.914913302,35.666695883],[76.91493923,35.666724959],[76.915207241,35.666822735],[76.915860879,35.666911456],[76.916514519,35.667000175],[76.917005814,35.667226642],[76.917607928,35.667469365],[76.918093625,35.667461628],[76.918556198,35.667697134],[76.918988785,35.667951988],[76.919232928,35.668002162],[76.919321237,35.668000755],[76.919629456,35.667959795],[76.919673858,35.667942793],[76.919760295,35.667898205],[76.919981481,35.667779183],[76.920126157,35.667708343],[76.920214688,35.667668778],[76.920303871,35.667631432],[76.92039373,35.667596247],[76.920484366,35.667563321],[76.920575888,35.667532886],[76.920668516,35.667505346],[76.920751994,35.667483795],[76.920826109,35.667467662],[76.920923521,35.667451063],[76.921191741,35.667410717],[76.921382244,35.667373135],[76.921820758,35.667239978],[76.922016863,35.667128711],[76.922083508,35.666837787],[76.92202023,35.666722402],[76.921980856,35.666664624],[76.921965328,35.666643414],[76.921681209,35.666394504],[76.921415918,35.666178334],[76.921276267,35.666061434],[76.920951837,35.665886387],[76.920627409,35.665711339],[76.920048024,35.665495303],[76.919347868,35.665308222],[76.918821739,35.665010229],[76.918561501,35.664748546],[76.918301265,35.664486863],[76.917884879,35.664160083],[76.917189619,35.66388843],[76.916955329,35.663903425],[76.916791912,35.663996141],[76.916348435,35.664498817],[76.915945806,35.664978315],[76.915675231,35.665207903],[76.915404656,35.665437489],[76.914956589,35.665748745],[76.914771218,35.66607835],[76.914715783,35.666349687]]]]\n" +
                "            }\n" +
                "        }";

        String geoJsonStr3 = "{\n" +
                "  \"type\": \"FeatureCollection\",\n" +
                "  \"features\": [\n" +
                "        {\"type\":\"Feature\",\n" +
                "        \"properties\":{},\n" +
                "        \"geometry\":{\n" +
                "            \"type\":\"Point\",\n" +
                "            \"coordinates\":[105.380859375,31.57853542647338]\n" +
                "            }\n" +
                "        },\n" +
                "\t\t{\"type\":\"Feature\",\n" +
                "        \"properties\":{},\n" +
                "        \"geometry\":{\n" +
                "            \"type\":\"Point\",\n" +
                "            \"coordinates\":[105.380859375,31.57853542647338]\n" +
                "            }\n" +
                "        }\n" +
                "    ]\n" +
                "}";
        System.out.println(System.currentTimeMillis());
        /*String[] wktStr = new String[]{"POINT(6 10)"};

        Map map = new HashMap();
        map.put("af","eee");
        for (String s : wktStr) {
            //System.out.println("WKT 转 Feature：" + GeoTools.wktToFeature(s));

        }
        cn.hutool.json.JSONObject json = (cn.hutool.json.JSONObject) JSONUtil.parseObj(geoJsonStr2);
        System.out.println("WKT 转 Feature：" + GeoTools.geoJsonToWkt(json));*/
    }
}
